package com.moo2u2.android.oaktononthego.timesheet.dao;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class TimesheetDatabaseHelper extends SQLiteOpenHelper {
	private static final String DATABASE_NAME = "oaktontimesheetdata.db";

	private static final int DATABASE_VERSION = 13;

	public TimesheetDatabaseHelper(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	/** {@inheritDoc} */
	@Override
	public void onCreate(SQLiteDatabase database) {
		TimesheetTable.onCreate(database);
		TimesheetEntryTable.onCreate(database);
	}

	/** {@inheritDoc} */
	@Override
	public void onUpgrade(SQLiteDatabase database, int oldVersion,
			int newVersion) {
		TimesheetTable.onUpgrade(database, oldVersion, newVersion);
		TimesheetEntryTable.onUpgrade(database, oldVersion, newVersion);
	}
}
